<?php

namespace app\models;
use yii\db\ActiveRecord;
use yii\helpers\ArrayHelper;

class CustomTableView extends ActiveRecord
{

    public function rules()
    {
        return [



            ['id', 'integer'],
            ['custom_name',  'string'],
            ['spec_id', 'integer'],


            ['attr_field_name', 'string'],//属性菜单名称



            ['attr_spec_id', 'integer'],//规格编码
            ['attr_spec_width', 'integer'],//尺寸80
            ['show_name', 'string'],//
            ['sort', 'integer'],


        ];

    }

    public function getAttrSpecs()
    {
        return $this->hasOne(AttrSpec::className(), ['attr_spec_id' => 'attr_spec_id']);
    }


}

?>
